package com.zxx.pattern.chainPattern.chain4_broadcast;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import com.zxx.designpattern.R;

public class MainChain4Activity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main_chain4);
    }


    //责任链广播
    public void sendBroadcast(View view) {
        Intent intent = new Intent();
        intent.setAction("com.zxx.broadcast.action.ORDER_BROADCAST");
        intent.putExtra("limit", 10);
        intent.putExtra("msg", "Message from Activity");
        sendOrderedBroadcast(intent, null);
    }

}